/* 模型性能页面样式 */

/* 模型概览卡片 */
.models-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.model-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1));
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.model-card:hover::before {
    transform: translateX(0);
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.model-card.random-forest {
    border-left-color: #22c55e;
}

.model-card.xgboost {
    border-left-color: #3b82f6;
}

.model-card.lstm {
    border-left-color: #8b5cf6;
}

.model-card.ensemble {
    border-left-color: #f59e0b;
}

.model-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.model-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.random-forest .model-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.xgboost .model-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.lstm .model-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.ensemble .model-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.model-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.model-title p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.model-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    flex: 1;
}

.metric-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.model-description {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

/* 可点击模型卡片样式 */
.clickable-card {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.model-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    gap: 0.5rem;
}

.clickable-card:hover .model-card-overlay {
    opacity: 1;
}

.model-card-overlay i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    animation: gentle-bounce 3s infinite;
}

@keyframes gentle-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40% {
        transform: translate3d(0, -3px, 0);
    }
    60% {
        transform: translate3d(0, -2px, 0);
    }
}

.model-card-overlay span {
    font-size: 1rem;
    letter-spacing: 0.3px;
}

/* 性能对比图表 */
.performance-charts {
    margin: 2rem 0;
}

.performance-charts .chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.performance-charts .chart-row:last-child {
    grid-template-columns: 1fr;
}

.performance-charts .chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.performance-charts .chart {
    height: 300px;
}

.radar-chart .chart {
    height: 400px;
}

/* 详细分析面板 */
.detailed-analysis {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.analysis-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.tab-button.active {
    color: #3b82f6;
    background: white;
}

.tab-button.active::after {
    transform: scaleX(1);
}

.tab-content {
    padding: 2rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 性能表格 */
.performance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.performance-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.performance-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.performance-table tr:hover {
    background: #f8fafc;
}

.metric-excellent {
    color: #059669;
    font-weight: 600;
    position: relative;
}

.metric-excellent::after {
    content: '★';
    margin-left: 0.5rem;
    color: #fbbf24;
}

.metric-good {
    color: #2563eb;
    font-weight: 600;
}

.metric-poor {
    color: #dc2626;
    font-weight: 600;
}

/* 对比摘要 */
.comparison-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.comparison-summary > div {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.comparison-summary > div:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.comparison-summary h4 {
    margin: 0 0 1rem 0;
    color: #374151;
    font-size: 1rem;
}

.comparison-summary .winner {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.comparison-summary .score {
    font-size: 0.875rem;
    color: #6b7280;
}

/* 特征重要性和预测分析图表 */
.features-analysis .chart,
.prediction-analysis .chart {
    height: 400px;
    margin-top: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .models-overview {
        grid-template-columns: 1fr;
    }
    
    .performance-charts .chart-row {
        grid-template-columns: 1fr;
    }
    
    .model-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .analysis-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: left;
    }
    
    .comparison-summary {
        grid-template-columns: 1fr;
    }
    
    .performance-table {
        font-size: 0.875rem;
    }
    
    .performance-table th,
    .performance-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card,
.performance-charts .chart-container,
.detailed-analysis {
    animation: fadeInUp 0.6s ease-out;
}

.model-card:nth-child(2) {
    animation-delay: 0.1s;
}

.model-card:nth-child(3) {
    animation-delay: 0.2s;
}

.model-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* 加载状态 */
.models-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6b7280;
}

.models-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
} 